This disclosure relates generally to digital processing of image data. This disclosure relates more specifically to edge detection in digital image processing. An edge within an image is a sharp change in local intensity or lightness. In other words, edges are features within an image that possess strong intensity contrast. Edges occur between distinct objects in a scene, or within textures and structure within an object. For instance, typographic characters on a white page background produce distinct edges. Edge pixels in a digital image are those pixels that occur at and about an edge in the image.
Two key properties of an edge are strength and orientation. Edge strength is a measure of the contrast of an edge. A black typographic character on a white background produces stronger edges than a gray character on a white background. Edge orientation can be described by a variety of measures, such as angle quantified in degrees or by classes such as vertical, horizontal, and diagonal.
Other attributes of edges are also useful to image analysis and image processing. For instance, classification of combined edges, such as corners, has been used in object recognition and in image enhancement applications. Edge thickness is a measure that provides information on the breadth of a local contrast change and can indicate a degree of blur in an image, see for example: U.S. Pat. No. 6,763,141, entitled “ESTIMATION OF LOCAL DEFOCUS DISTANCE AND GEOMETRIC DISTORTION BASED ON SCANNED IMAGE FEATURES,” to inventors B. Xu, R. Loce, which is hereby incorporated in its entirety for its teachings. Inner edges and outer edges refer to regions just inside of or just outside of a given object, respectively, and have been used in applications such as character stroke thinning and thickening. The presence or absence of an edge is an edge-related property that has been used in applications such as image classification and recognition. Distance from an edge is also an edge-related property that has been used in image enhancement applications.
Edge detection in digital image processing typically employs a collection of methods used to identify or modify edge pixels or indicate properties of edges and edge pixels within an image. Edge detection methods are sometimes referred to simply as edge detectors. There are numerous applications of edge detectors in digital image processing for electronic printing. For example, identification of corner pixels has been used to sharpen corners within an image, see: U.S. Pat. No. 6,775,410, entitled “IMAGE PROCESSING METHOD FOR SHARPENING CORNERS OF TEXT AND LINE ART,” to inventors R. Loce, X. Zhu, C. Cuciurean-Zapan. Identification of inner and outer border pixels has been used to control the apparent darkness of character strokes, see: U.S. Pat. No. 6,606,420, entitled “METHOD AND APPARATUS FOR DIGITAL IMAGE DARKNESS CONTROL IN SATURATED IMAGE STRUCTURES”, to Loce et al; and U.S. Pat. No. 6,181,438, entitled “METHOD AND APPARATUS FOR DIGITAL IMAGE DARKNESS CONTROL USING QUANTIZED FRACTIONAL PIXELS,” to Bracco et al. Also identification of anti-aliased pixels has been used for preferred rendering of those same pixels, see: U.S. Pat. No. 6,243,499, entitled “TAGGING OF ANTIALIASED IMAGES,” to Loce, et al.; U.S. Pat. No. 6,144,461, entitled “METHOD FOR GENERATING RENDERING TAGS TO FACILITATE THE PRINTING OF ANTIALIASED IMAGES,” to Crean et al.; and U.S. Pat. No. 6,167,166, entitled “METHOD TO ENABLE THE RECOGNITION AND RENDERING OF ANTIALIASED IMAGES,” to Loce et al. All of the above cited are hereby incorporated by reference in their entirety for their teachings.
Edge detectors typically operate using a convolution mask and are based on differential operations. Differentials for edge/line detection are used to define color or brightness changes of pixels and their change directions. If there is an abrupt change of brightness within a short interval within an image, it means that within that interval there is high probability that an edge exists. One example of a convolution-based edge detector is the Roberts edge detector, which employs the square root of the magnitude squared of the convolution with the Robert's row and column edge detectors. The Prewitt edge detector employs the Prewitt compass gradient filters and returns the result for the largest filter response. The Sobel edge detector operates using convolutions with row and column edge gradient masks. The Marr-Hildreth edge detector performs two convolutions with a Laplacian of Gaussians and then detects zero crossings. The Kirsch edge detector performs convolution with eight masks that calculate gradient.
As indicated above, common edge detection methods employ a convolution-type computing architecture, usually with fixed coefficients. In the field of image processing, and in particular, for image processing in anticipation of electronic printing, the edge detection needs are numerous and varied. Further, image processing for electronic printing often requires that any processing method operate “real-time,” within a small number of fixed clock cycles, thereby excluding more complicated methods as too computationally intensive. What is needed is an edge detection method with a computing architecture that is more readily adapted to a wide variety of edge detection needs than are the common convolution-based methods, and which can be readily adapted to real-time applications.
Disclosed in embodiments herein is a method for processing a digital image to identify edge pixels within the digital image. The method comprises selecting a target pixel location within the digital image; observing a set of pixels within a pixel observation window superimposed on the digital image, relative to the target pixel location; generating edge-state codes for a plurality of pairs of neighboring vectors of pixels within the pixel observation window; and generating edge-identification codes from the plurality of edge-state codes using at least one look-up table so as to thereby identify edge pixels.
Further disclosed in embodiments herein is a method for producing edge identification codes from continuous tone digital image data. The method comprises selecting a target pixel location within the continuous tone digital image; observing a set of pixels within a pixel observation window superimposed on the continuous tone digital image relative to the target pixel location; generating sums of weighted pixels values, where the sums are taken over first-orientation vectors of pixels that run through the observation window; generating sum-to-sum differences for neighboring pairs of said first-orientation vectors of pixels; generating edge-state codes for each pair of the neighboring first-orientation vectors of pixels by using one or more bits to encode a magnitude and one bit to encode a sign; and generating a first-orientation edge identification code by using a plurality of said encoded edge-state codes, where the bits of the edge-state codes are combined to form an index that addresses a first-orientation look-up table that maps multiple encoded edge states to a first-orientation edge identification code.
Further disclosed in embodiments herein is a method for producing edge identification codes from binary digital image data. The method comprises selecting a target pixel location within the binary digital image; observing a set of pixels within a pixel observation window superimposed on the binary digital image relative to the target pixel location; generating sums of weighted pixels values, where the sums are taken over first-orientation vectors of pixels that run through the observation window; generating sum-to-sum differences for neighboring pairs of said first-orientation vectors of pixels; generating edge-state codes for each pair of the neighboring first-orientation vectors of pixels by using one or more bits to encode a magnitude and one bit to encode a sign; and generating a first-orientation edge identification code by using a plurality of said encoded edge-state codes, where the bits of the edge-state codes are combined to form an index that addresses a first-orientation look-up table that maps multiple encoded edge states to a first-orientation edge identification code.